package com.javasvip.serviceuser.dao;

import com.javasvip.common.pojo.Token;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface LagouTokenDao extends JpaRepository<Token, Long> {
    @Query("from Token oken order by id desc ")
    List<Token> ff();

    @Query("from Token WHERE email=:email AND token =:token ")
    List<Token> login(@Param("email") String email, @Param("token") String token);

}
